﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <!--<script src="http://code.jquery.com/jquery-latest.js" type="text/javascript"></script>
    <script src="http://www.jongma.org/webtools/jquery/jquery.xslt.js" type="text/javascript"></script>-->
    <script src="lib/jquery-latest.js" type="text/javascript"></script>
    <script src="lib/jquery.xslt.js" type="text/javascript"></script>
    <script src="lib/jquery.tmpl.js" type="text/javascript" charset="utf-8"></script>
    <!--<script src="lib/jquery.link.js" type="text/javascript" charset="utf-8"></script>-->
    <script src="lib/spine.js" type="text/javascript"></script>
    <script src="lib/spine.model.ajax.js" type="text/javascript"></script>
    <script src="lib/spine.model.local.js" type="text/javascript"></script>
    <script src="spine.model.ajax2.js" type="text/javascript"></script>
    <script src="app/cofe.js" type="text/javascript"></script>
    <script src="app/classes/cofe.link.js" type="text/javascript"></script>
    <script src="app/models/cofe.models.js" type="text/javascript"></script>
    <script src="app/models/cofe.models.entry.js" type="text/javascript"></script>
    <script src="app/models/cofe.models.file.js" type="text/javascript"></script>
    <script src="app/models/cofe.models.folder.js" type="text/javascript"></script>
    <script src="app/models/cofe.models.entryList2.js" type="text/javascript"></script>
    <script src="app/controllers/cofe.controllers.contentList2.js" type="text/javascript"></script>
    <script src="app/application.js" type="text/javascript" charset="utf-8"></script>

    <script type="text/x-jquery-tmpl" id="hierarchyTreeTemplate">
    {{if last}}${label}{{else}}<a href="${'#' + path}">${label}</a>/{{/if}}     
    </script>
    <script type="text/x-jquery-tmpl" id="contentListTemplate">            
      <br />      
      {{each folders}}
        <div class="{{= (0 === $index % 2) ? 'oddrow' : 'evenrow' }} folder">
            <a href="${'#' + path}">${path}/</a>
        </div>
      {{/each}}   
      {{each files}}
        <div class="{{= (0 === ($index + folders.length) % 2) ? 'oddrow' : 'evenrow' }} file">
          {{if typeof(links['SLOW_smallIcon']) == 'object' }}
            <img src="${links['smallIcon'].uri}" width="16" height="16" />
          {{/if}}

          {{if typeof(links['download']) == 'object' }}
            <a href="${links['download'].uri}">${path}</a>
          {{else}}
            ${path}
          {{/if}}
        </div>
       {{/each}}       
    </script>
    <style type="text/css">
        html {height: 100%; margin-bottom: 1px; overflow:scroll;}
        .oddrow { padding: 5px; border-top: 1px groove gray; }        
        .evenrow { padding: 5px; border-top: 1px groove gray; }      
        .file {  }
        .folder { background-color:#EEEEEE; } 
        .hierarchyTree { display: inline; }
        
        .option { color:Green; display: inline; }
        #refresh { float:right; }
        #parent { float:right; }
        .request { visibility : collapse; }
        .contentList { border: 5px groove black; padding: 10px; width:auto;  }
        .result { width:50%; margin:auto; }                
        .result .header { text-align:right; font-family:"Sans-serif", Times, serif; text-decoration:underline; }
    </style>
    <title></title>
</head>
<body>
    <div id="contentList">
        <div class="request">
            <input class="path" type="text" />
            <input class="search" type="button" value="Search" />
            <input class="refresh" type="button" value="Refresh" />
            <input class="parent" type="button" value="Go up" />
        </div>
        <div class="result">
            <div class="hierarchyTree">
                hierarchyTree</div>
            <div id="parent" class="option">
                [up]</div>
            <div id="refresh" class="option">
                [refresh]</div>
            <div class="workIndicator">
                Loading...</div>
            <div class="contentList">
                contentList</div>
        </div>
    </div>
</body>
</html>
